/*
* PureMVC Logger v1.0
* Copyright (c) 2009 We Are Cloud.
* Author: Yannick Chaze
*
* Based on PureMVC code
* See http://puremvc.org for more informations
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0.
*
* PureMVC MultiCore - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved.
* Your reuse is governed by the Creative Commons Attribution 3.0 United States License
*/

package com.wearecloud.puremvclogger.core
{
	import org.puremvc.as3.multicore.core.Model;
	import org.puremvc.as3.multicore.interfaces.IModel;
	
	/**
	 * The <code>ModelLogger</code> class assures coherence
	 * with the other logger classes
	 * 
	 * @see org.puremvc.as3.multicore.core.Model
	 * @see org.puremvc.as3.multicore.interfaces.IModel
	 */
	
	public class ModelLogger extends Model implements IModel
	{
		/**
		 * @inheritDoc
		 */
		public function ModelLogger ( key:String )
		{
			super( key );
		}
		
		/**
		 * @inheritDoc
		 */
		public static function getInstance( key:String ) : IModel 
		{
			if (instanceMap[ key ] == null) instanceMap[key] = new ModelLogger( key );
			return instanceMap[key];
		}
		
		/**
		 * @inheritDoc
		 */
		public static function removeModel( key:String ):void
		{
			delete instanceMap[ key ];
		}
	}
}